<?php


namespace app\common\repositories\system\merchant;


use app\common\dao\system\merchant\FinancialWechatDao;
use app\common\repositories\BaseRepository;
use app\common\repositories\user\UserBillRepository;
use think\facade\Cache;
use think\facade\Db;

/**
 * Class FinancialRecordRepository
 * @package app\common\repositories\system\merchant
 * @mixin FinancialWechatDao
 */
class FinancialWechatRepository extends BaseRepository
{
    public function __construct(FinancialWechatDao $dao)
    {
        $this->dao = $dao;
    }

    /**
     * @param array $where
     * @param int $page
     * @param int $limit
     * @return array
     * @author: fupeng
     * @day: 2024/1/4
     */
    public function getList(array $where,int $page,int $limit)
    {
        $query = $this->dao->search($where)->order('create_time DESC');
        $count = $query->count();
        $list = $query->page($page, $limit)->select();
        return compact('count', 'list');
    }

}
